<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <button id="btn">点我proxy</button>


  <script type="text/javascript">

  document.getElementById('btn').onclick = function () {
     var xhr = new XMLHttpRequest();
     xhr.open('get','http://localhost:7777/proxy');
     xhr.send();
     xhr.onreadystatechange = function (res) {
        if(xhr.readyState === 4 && xhr.status === 200) {
          alert(xhr.responseText);
        }
     } 

  }


  </script>
</body>
</html>